package com.blb.service.user;

import com.blb.pojo.Carousel;
import com.blb.pojo.Product;
import com.blb.pojo.ProductType;

import java.sql.SQLException;
import java.util.List;

public interface IIndexService {

    /**
     * 轮播图
     * @return
     * @throws Exception
     */
    List<Carousel> getCarousel() throws Exception;

    /**
     * 新品
     * @return
     * @throws Exception
     */
     List<Product> getNewProduct() throws Exception;

    /**
     * 商品分类
     * @return
     */
    List<ProductType> getProductType() throws Exception;

    /**
     *  商品信息
     * @return
     * @throws Exception
     */
    List<Product> getProductAndBrand(String id) throws Exception;

    /**
     * 添加到购物车
     * @param id
     * @param productId
     * @param num
     */
    void setOrderData(int id, int productId, int num) throws SQLException, ClassNotFoundException;

    /**
     * 铲鲟所有的Product
     * @return
     * @throws Exception
     */
    List<Product> selectProduct() throws Exception;
}
